/*
 * Determine whether an integer is a palindrome. Do this without extra space.
 */
class Solution {
public:
    bool isPalindrome(int x) {
        if (x < 0) {
            return false;
        }
        int t = x, rev = 0;
        while (t > 0) {
            rev = rev * 10 + t % 10;
            t /= 10;
        }
        return x == rev;
    }
};

int main() {
    return 0;
}
